<?php
include_once('class/autoload.php');
$page = new page_admin('Profil');
$page->URL(__FILE__);
$page->titre = 'Profil';
$page->logo = 'male';
if (isset($_GET['modifie']))
{
	if ($_GET['modifie'] == 1)
	{
		$page->gritter = "Votre profil à bien été édité";
	}
	else if ($_GET['modifie'] == 0)
	{
		$page->gritter = "Une erreur est survenu";
	}
}
if(isset($_SESSION['enligne']) && $_SESSION['enligne'] == true)
{
$Administrateur = unserialize($_SESSION['Objet']);
$Profil = $Administrateur->ArrayProfil();
$Nom = $Profil['Nom'];
$Prenom = $Profil['Prenom'];
$Tel = $Profil['Tel'];
$Email = $Profil['Email'];
$PhotoProfil = $Administrateur->Getphotoprofil()['PHO_FICHIER'];
}
else 
{
	$Nom = 'Nom';
	$Prenom = 'Prenom';
	$Tel = 'Tel';
	$Email = 'Email';
	$PhotoProfil = "nophoto.jpg";
}

$page->contenu = '<div class="col-lg-9 main-chart">
        	<h2>PROFIL</h2><br>
				<div class="col-md-12">
					<div class="form-panel">
						<form class="form-horizontal style-form" method="POST" action="CLASS/Administrateur/receptionform.php">
                    	<h4><i class="fa fa-angle-right"></i> Vos informations</h4><hr>
                          <div class="form-group">
                              <label class="col-sm-2 col-sm-2 control-label">Nom</label>
                              <div class="col-sm-10">
                                  <input class="form-control" name="Nom" type="text" value="'.$Nom.'">
                              </div>
                          </div>
                            <div class="form-group">
                              <label class="col-sm-2 col-sm-2 control-label">Prenom</label>
                              <div class="col-sm-10">
                                  <input class="form-control" name="Prenom" type="text" value="'.$Prenom.'">
                              </div>
                          </div>
                            <div class="form-group">
                              <label class="col-sm-2 col-sm-2 control-label">Tel</label>
                              <div class="col-sm-10">
                                  <input class="form-control" name="Tel" type="text" value="'.$Tel.'">
                              </div>
                          </div>
                            <div class="form-group">
                              <label class="col-sm-2 col-sm-2 control-label">E-Mail</label>
                              <div class="col-sm-10">
                                  <input class="form-control" name="Email" type="text" value="'.$Email.'">
                              </div>
                          </div>
							<input type="hidden" name="modifier">
                          <center><button type="submit" class="btn btn-success">Enregistrer</button></center>
						</form>
                          <form hidden id="ckeditor-form">
            				<textarea name="editor1" id="editor1" rows="10" cols="80">
           				 	</textarea>
        				</form>
                      </div><!-- /content-panel -->
                  </div ><!-- /col-md-12 END SECTION MIDDLE -->  
                </div><!-- /col-lg-9 END SECTION MIDDLE -->
		
		<!--COMPLETED ACTIONS DONUTS CHART-->
		<div class="col-lg-3 ds">
		<h3>PHOTO</h3><br>
		<img class="col-lg-12" src="assets/img/PhotoProfil/'.$PhotoProfil.'">
		<form class="col-lg-12" class= method="post" action="CLASS/Administrateur/receptionform.php" enctype="multipart/form-data">
		<br><input type="file" name="photoprofil"/>
		<input type="hidden" name="fichier" value="'.$Nom.$Prenom.'" />
	
		</form>
		</div><!-- /col-lg-3(Colonne Gauche)-->';
$page->affiche();


?>
